<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link
	href="css/bootstrap.min.css"
	rel="stylesheet">
<title>瀚文大酒店客房总表</title>
</head>
<body>
    <div class="panel panel-primary">
        <!-- Default panel contents -->
        <div class="panel-heading">瀚文大酒店客房总表</div>
        <div class="panel-body form-inline">
            <form action="AddBookServlet">

                <div class="form-group">
                    <label>房间号</label>
                    <input type="text" class="form-control" name="id">
                </div>

                <div class="form-group">
                    <label>规格</label>
                    <input type="text" class="form-control" name="name">
                </div>
    
                <div class="form-group">
                    <label>房型</label>
                    <input type="text" class="form-control" name="author">
                </div>
    
                <div class="form-group">
                    <label>价格</label>
                    <input type="text" class="form-control" name="price">
                </div>
                <input type = "submit"  class="btn btn-primary" value="添加">
            </form>

        </div>
      </div>

      <table class="table table-bordered table-hover table-striped">
        <thead class="thead-inverse">
            <tr>
                           <th>房间号</th>
                           <th>规格</th>
                           <th>房型</th>
                           <th>价格</th>
                           <th>操作</th>
                           &nbsp;&nbsp;  <th> <a href="/register.jsp">管理人员注册</a> </th>
                           <br/>
                           <th> <a href="BookListServlet2" class="btn btn-primary">客户表</a> </th>
                           <th> <a href="BookListServlet3" class="btn btn-primary">客户申请退房表</a> </th>
                       </tr>
            </thead>
            <tbody>
                <c:forEach items="${booklist}" var="book">
	                <tr>
	                    <td scope="row">${book.id}</td>
	                    <td>${book.name}</td>
	                    <td>${book.author}</td>
	                    <td>${book.price}</td>
	                    <td>
                            <a href="GetBookByIdServlet1?id=${book.id }" class="btn btn-primary">修改</a>&nbsp;&nbsp;&nbsp;
                            <a href="DeleteBookServlet?id=${book.id}" class="btn btn-danger">删除</a>
                        </td>
	                </tr>
				</c:forEach>
            </tbody>
    </table>
      
</body>
</html>